nextRound
TechnologiesCoding ProblemsBookmarksLearning Paths
nextRound
TechnologiesCoding ProblemsBookmarksLearning Paths
nextRound

AI-powered interview preparation platform. Practice with curated questions, mock interviews, and personalized learning paths to crack your dream tech interview.

Quick Links

  • Technologies
  • Saved Questions
  • Pricing

Company

  • About Us
  • Contact Us

Legal

  • Privacy Policy
  • Terms of Use

© 2026 nextRound. All rights reserved.

TOPIC OVERVIEW

react/State and Props

Two ways data flows into a component — one it owns, one it's given.

10 QuestionsIntermediateHigh Priority ~10 min read

Props flow one direction — from parent to child — and are read-only from the receiving component's perspective; a component should never modify its own props. State, by contrast, is owned internally by the component that declares it, can change over time, and triggers a re-render whenever it does. The distinction isn't just naming — it's about ownership and who's allowed to change what.

This is also where 'lifting state up' comes from: when two sibling components need to share or coordinate on the same piece of state, that state has to live in their closest common ancestor and get passed down as props to both. It's the default pattern for cross-component data sharing in React, and it's also the root of prop drilling — as trees get deeper, that shared state has to be threaded through every intermediate component whether or not it needs it.

What you'll walk away knowing

The core distinction: props are passed in and read-only, state is owned and mutable
Why directly mutating props is a bug, and what 'read-only' actually means here
What 'lifting state up' means and why it's the default way to share state between siblings
How lifting state up leads directly to the prop drilling problem as trees grow deeper
1What is the state and props? How are they different?Intermediate2How can you update the state of a component in React?Intermediate3What happens when you call setState?Intermediate4What is derived state in react ?Intermediate5What is the 'children' prop in React and how is it used?Intermediate6What is the purpose of the 'defaultProps' property in a React component?Beginner7What is the purpose of the callback function as an argument of setState?Intermediate
All Topics
1
Basics
JSX
State and Props
Components
Function Components
2
Virtual DOM
Reconciliation
Class Components
Lifecycle functions
3
Hooks
useState
useReducer
useMemo
useContext
useCallback
useEffect
Custom Hooks
New Hooks
4
Code Sharing
HOC
Refs
Data Sharing
Events
Context API
5
Redux
Router
CSR-SSR
React APIs
ReactDOM
Strict Mode
6
Performance Optimisation
Security
Sharethis topic

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.